//package com.inspur.edp.udt.generator.core.rtgenerator.entity.dtms;
//
//
//import com.inspur.edp.caf.generator.baseInfo.ParameterInfo;
//import com.inspur.edp.caf.generator.baseInfo.TypeInfo;
//import com.inspur.edp.cef.api.dataType.valueObj.ICefValueObjContext;
//import com.inspur.edp.cef.rtgenerator.entitygen.determination.method.GetDeterminationContextGenerator;
//import com.inspur.edp.udt.api.Udt.IUdtContext;
//import com.inspur.edp.udt.core.Determination.UdtDeterminationContext;
//import org.eclipse.jdt.core.dom.Block;
//import org.eclipse.jdt.core.dom.CastExpression;
//import org.eclipse.jdt.core.dom.ClassInstanceCreation;
//import org.eclipse.jdt.core.dom.ReturnStatement;
//
//import java.util.ArrayList;
//import java.util.Arrays;
//
//public class UdtGetDeterminationContextGenerator extends GetDeterminationContextGenerator
//{
//	public UdtGetDeterminationContextGenerator()
//	{
//	}
//
//	@Override
//	protected ArrayList<ParameterInfo> getParameterCollection() {
//		ParameterInfo parameterInfo=new ParameterInfo();
//		parameterInfo.setParamName("data");
//		parameterInfo.setParamType(new TypeInfo(ICefValueObjContext.class));
//		return  new ArrayList<ParameterInfo>(Arrays.asList(new ParameterInfo[]{parameterInfo}));
//	}
//
//	@Override
//	protected Class getContextParType() {
//		return ICefValueObjContext.class;
//	}
//
//	@Override
//	protected Block buildMethodBody() {
//		Block block=ast.newBlock();
//		ReturnStatement returnStatement=ast.newReturnStatement();
//		ClassInstanceCreation classInstanceCreation=ast.newClassInstanceCreation();
//		classInstanceCreation.setType(ast.newSimpleType(ast.newName(UdtDeterminationContext.class.getTypeName())));
//
//		CastExpression castExpression=ast.newCastExpression();
//		castExpression.setType(ast.newSimpleType(ast.newName(IUdtContext.class.getTypeName())));
//		castExpression.setExpression(ast.newSimpleName("data"));
//		classInstanceCreation.arguments().add(castExpression);
//
//		returnStatement.setExpression(classInstanceCreation);
//		block.statements().add(returnStatement);
//		return block;
//	}
//}